﻿<UserControl x:Class="Utils.Wpf.UpDownArrow"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
			 
			 xmlns:Wpf="clr-namespace:Utils.Wpf" >
	
	<UserControl.Resources>
		<Storyboard x:Key="UpToDownAnimation" >
			<ColorAnimation Duration="00:00:00.5" Storyboard.TargetProperty="Stroke.Color" Storyboard.TargetName="Arrow" x:Name="UpBorderAnimation" />
			<ColorAnimation Duration="00:00:00.5" Storyboard.TargetProperty="Fill.Color" Storyboard.TargetName="Arrow" x:Name="UpFillAnimation" />
			<DoubleAnimation From="0" To="180" Duration="00:00:00.5" Storyboard.TargetProperty="Angle" Storyboard.TargetName="Rotation" />
		</Storyboard>
		<Storyboard x:Key="DownToUpAnimation" >
			<ColorAnimation Duration="00:00:00.5" Storyboard.TargetProperty="Stroke.Color" Storyboard.TargetName="Arrow" x:Name="DownBorderAnimation" />
			<ColorAnimation Duration="00:00:00.5" Storyboard.TargetProperty="Fill.Color" Storyboard.TargetName="Arrow" x:Name="DownFillAnimation" />
			<DoubleAnimation From="180" To="360" Duration="00:00:00.5" Storyboard.TargetProperty="Angle" Storyboard.TargetName="Rotation" />
		</Storyboard>
	</UserControl.Resources>
	
    <Grid>
		<Polygon Points="0,0 6,0 3,-7" Stroke="DarkGray" Fill="Gray" Stretch="Fill" VerticalAlignment="Center" x:Name="Arrow" RenderTransformOrigin="0.5 0.5" >
			<Polygon.RenderTransform>
				<RotateTransform x:Name="Rotation" Angle="180" />
			</Polygon.RenderTransform>
		</Polygon>
	</Grid>
</UserControl>
